package com.axxc.cloud.service.master.impl;

import java.time.LocalDateTime;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.axxc.cloud.common.util.StringFormatUtil;
import com.axxc.cloud.mapper.master.MasterUserMapper;
import com.axxc.cloud.service.master.IMasterUserService;

@Service
public class MasterUserServiceImpl implements IMasterUserService {
	@Autowired
	private MasterUserMapper masterUserMapper;

	@Override
	public List<String> listAllUserMaster() {
		return masterUserMapper.listAllUserMaster();
	}

	@Override
	@Transactional(transactionManager = "masterPlatformTransactionManager")
	public void insert(String name) {
		masterUserMapper.insert(StringFormatUtil.format("{0}---{1}", name, LocalDateTime.now()));
	}

}
